package com.micro.school.order.controller;

import com.micro.school.common.core.web.controller.BaseController;
import com.micro.school.common.core.web.domain.AjaxResult;
import com.micro.school.common.core.web.page.TableDataInfo;
import com.micro.school.common.log.annotation.Log;
import com.micro.school.common.log.enums.BusinessType;
import com.micro.school.order.entity.PayPrepaymentImportRecord;
import com.micro.school.order.service.PayPrepaymentImportRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;


/**
 * 【请填写功能名称】Controller
 * 
 * @author rakic
 * @date 2025-08-05
 */
@RestController
@RequestMapping("/prepayImportRecord")
public class PayPrepaymentImportRecordController extends BaseController
{
    @Autowired
    private PayPrepaymentImportRecordService payPrepaymentImportRecordService;

    /**
     * 查询导入详细记录
     */
    @GetMapping("/list")
    public TableDataInfo list(PayPrepaymentImportRecord payPrepaymentImportRecord)
    {
        startPage();
        List<PayPrepaymentImportRecord> list = payPrepaymentImportRecordService.selectPayPrepaymentImportRecordList(payPrepaymentImportRecord);
        return getDataTable(list);
    }


    /**
     * 查询导入详细记录
     */
    @PostMapping("/listMessage")
    public AjaxResult listMessage(@RequestBody PayPrepaymentImportRecord payPrepaymentImportRecord)
    {
        Map<String,Object> map = payPrepaymentImportRecordService.listMessage(payPrepaymentImportRecord);
        return AjaxResult.success(map);
    }


    /**
     * 删除导入详细记录
     */
    @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
	@DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long ids)
    {
        return toAjax(payPrepaymentImportRecordService.remove(ids));
    }


}
